#ifndef __PRODUCE_ELEMENT_VIEW_H__
#define __PRODUCE_ELEMENT_VIEW_H__

#include "gofgame/common/ui/Container.h"
#include "gofgame/common/ui/Image.h"
#include "gofgame/common/ui/Button.h"
#include "gofgame/common/ui/Label.h"
#include "gofgame/common/ui/DialogClosedEventArgs.h"
#include "gofgame/common/resource/HornedTextureBrushResource.h"
#include "gofgame/common/Ref.h"
#include "gofgame/dungeonkeeper/game/skill/ProduceManager.h"

namespace gofgame {
	namespace dungeonkeeper {
		namespace ui {

			using namespace gofgame::common::ui;
			using namespace gofgame::common;
			using namespace gofgame::common::resource;
			using namespace gofgame::dungeonkeeper::game::skill;

			class ProduceElementView : public Container {
			public:
				virtual bool init() _override;
				virtual ProduceElementViewInfo getProduceElementViewInfo();
				virtual void setProduceElementViewInfo(const ProduceElementViewInfo &pevi);
				
			protected:
				Ref<Image> image;
				Ref<Label> nameLabel;
				Ref<Label> levelLabel;
				Ref<Label> descriptionLabel;
				Ref<Button> upgradeButton;
				static HornedTextureBrushResource elementBrushResource;

			private:
				void upgradeButton_click(void *sender, ComponentEventArgs &e);
				void upgradeConfirmDialog_close(void* sender, DialogClosedEventArgs &e);
			};
		}
	}
}

#endif //__PRODUCE_ELEMENT_VIEW_H__
